import java.util.*;

public class Doudiz {
    public static void main(String[] args) {
        new Doudiz();
        stac();
    }

    static TreeMap<Integer, String> map = new TreeMap<>();
    static ArrayList<Integer> list = new ArrayList<>();

    static {
        String[] colors = {"♠", "♥", "♣", "♦"};
        String[] numbers = {"3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A", "2"};
        int a = 1;
        for (String color : colors) {
            for (String number : numbers) {
                map.put(a, color + number);
                list.add(a);
                a++;
            }
        }
        map.put(a, "🃏");
        list.add(a);
        a++;
        map.put(a, "👲");
        list.add(a);
    }

    public static void stac() {
        Collections.shuffle(list);
        TreeSet<Integer> integers1 = new TreeSet<>();
        TreeSet<Integer> integers2 = new TreeSet<>();
        TreeSet<Integer> integers3 = new TreeSet<>();
        TreeSet<Integer> integers4 = new TreeSet<>();
        for (int i = 0; i < list.size(); i++) {
            Integer pok = list.get(i);
            if (i < 3) {
                integers1.add(pok);
            }
            if (i % 3 == 0) {
                integers2.add(pok);
            } else if (i % 3 == 1) {
                integers3.add(pok);
            } else {
                integers4.add(pok);
            }
        }
        paix("d", integers1);
        paix("z1", integers2);
        paix("z2", integers3);
        paix("z3", integers4);

    }

    public static void paix(String name, TreeSet<Integer> s) {
        System.out.print(name + ":");
        for (Integer i : s) {
            String s1 = map.get(i);
            System.out.print(s1+" ");
        }
        System.out.println();
    }
}
